package cn.lmxdev.mongodatafilesavedemo.service;

import cn.lmxdev.mongodatafilesavedemo.model.FileDocument;

import java.io.InputStream;
import java.util.List;
import java.util.Optional;

public interface FileService {
    FileDocument saveFile(FileDocument file);

    String uploadFileToGridFS(InputStream in, String contentType);

    void removeFile(String id);

    Optional<FileDocument> getFileById(String id);

    List<FileDocument> listFilesByPage(int pageIndex, int pageSize);
}
